import 'package:firstdemo/util/Toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class Login extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Material(
        child: new Scaffold(
      appBar: new AppBar(
          brightness: Brightness.light,
          iconTheme: IconThemeData(
            color: Color(0xFF333333), //修改颜色
          ),
          title: Text(
            "登录",
            style: TextStyle(color: Color(0xFF333333), fontSize: 18),
          ),
          titleSpacing: 0,
          elevation: 0.3,
          backgroundColor: Color(0xFFFFFFFF)),
      body: Container(
        color: Colors.white,
        width: double.infinity,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Padding(
              padding: EdgeInsets.fromLTRB(34, 11, 0, 0),
              child: Text(
                "欢迎来到蘑游库",
                style: TextStyle(fontSize: 20),
              ),
            ),
            Padding(
              padding: EdgeInsets.fromLTRB(34, 17, 0, 0),
              child: Row(
                children: <Widget>[
                  SizedBox(
                    width: 8,
                  ),
                  Text(
                    "我已阅读并同意",
                    style: TextStyle(fontSize: 12, color: Color(0xff333333)),
                  ),
                  InkWell(
                      onTap: () {
                        ToastUtil.toast("点击了用户协议");
                      },
                      child: Text(
                        " 用户协议 ",
                        style:
                            TextStyle(fontSize: 12, color: Color(0xffff9711)),
                      )),
                  Text(
                    "和",
                    style: TextStyle(fontSize: 12, color: Color(0xff333333)),
                  ),
                  InkWell(
                      onTap: () {
                        ToastUtil.toast("点击了隐私政策");
                      },
                      child: Text(
                        " 隐私政策 ",
                        style:
                            TextStyle(fontSize: 12, color: Color(0xffff9711)),
                      )),
                ],

              ),
            ),
            TextField(
              decoration: InputDecoration(hintText: '请输入你的用户名'),
            )
          ],
        ),
      ),
    ));
  }
}
